from django.db import models

# Create your models here.
# In models, low verification (max value, length etc) but more verification in view
class Adresse(models.Model):
    rue = models.CharField(max_length=255)
    numero = models.IntegerField()
    code_postal = models.IntegerField(max_length=5)
    ville = models.CharField(max_length=255)
    

    class Meta:
        abstract = True

class LieuCamp(Adresse):
    contenu = models.TextField()

class Eglise(Adresse):
    contenu = models.TextField()

class Proprietaire(Adresse):
	nom = models.CharField(max_length=255)
	email = models.EmailField(blank=True)
	telephone = models.DecimalField(max_digits=10, decimal_places=0)

